package icms.ORM;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Comment entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "comment", catalog = "cms")
public class Comment extends BaseDTO implements java.io.Serializable {

	// Fields

	private Integer commentId;
	private String commentBody;
	private Integer commentArticleId;
	private String commentAuthor;
	private Date commentPublishTime;
	private Integer commentApproved;

	// Constructors

	/** default constructor */
	public Comment() {
	}

	/** minimal constructor */
	public Comment(String commentBody, String commentAuthor,
			Date commentPublishTime, Integer commentApproved) {
		this.commentBody = commentBody;
		this.commentAuthor = commentAuthor;
		this.commentPublishTime = commentPublishTime;
		this.commentApproved = commentApproved;
	}

	/** full constructor */
	public Comment(String commentBody, Integer commentArticleId,
			String commentAuthor, Date commentPublishTime,
			Integer commentApproved) {
		this.commentBody = commentBody;
		this.commentArticleId = commentArticleId;
		this.commentAuthor = commentAuthor;
		this.commentPublishTime = commentPublishTime;
		this.commentApproved = commentApproved;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "commentID", unique = true, nullable = false)
	public Integer getCommentId() {
		return this.commentId;
	}

	public void setCommentId(Integer commentId) {
		this.commentId = commentId;
	}

	@Column(name = "commentBody", nullable = false, length = 256)
	public String getCommentBody() {
		return this.commentBody;
	}

	public void setCommentBody(String commentBody) {
		this.commentBody = commentBody;
	}

	@Column(name = "commentArticleID")
	public Integer getCommentArticleId() {
		return this.commentArticleId;
	}

	public void setCommentArticleId(Integer commentArticleId) {
		this.commentArticleId = commentArticleId;
	}

	@Column(name = "commentAuthor", nullable = false, length = 128)
	public String getCommentAuthor() {
		return this.commentAuthor;
	}

	public void setCommentAuthor(String commentAuthor) {
		this.commentAuthor = commentAuthor;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "commentPublishTime", nullable = false, length = 19)
	public Date getCommentPublishTime() {
		return this.commentPublishTime;
	}

	public void setCommentPublishTime(Date commentPublishTime) {
		this.commentPublishTime = commentPublishTime;
	}

	@Column(name = "commentApproved", nullable = false)
	public Integer getCommentApproved() {
		return this.commentApproved;
	}

	public void setCommentApproved(Integer commentApproved) {
		this.commentApproved = commentApproved;
	}

}